package com.cxx.home.dto.travel;

import com.cxx.common.PlainView;
import com.cxx.common.ReadView;
import com.fasterxml.jackson.annotation.JsonView;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Range;

import java.util.List;

@Getter
@Setter
@JsonView(PlainView.class)
public class TravelSpotDto {
    @Schema(description = "id")
    @JsonView(ReadView.class)
    private Long id;

    @Schema(description = "景点名称")
    @NotBlank(message = "名称不能为空")
    private String name;

    @Schema(description = "景点地区")
    private List<String> area;

    @Schema(description = "景点地址")
    private String address;

    @Schema(description = "门票价格")
    private Double price;

    @Schema(description = "推荐指数")
    @Range(min = 0, max = 5, message = "推荐指数在0-5之间")
    private Integer recommendRate;

    @Schema(description = "交通")
    private String traffic;

    @Schema(description = "旅游路线")
    private String router;

    @Schema(description = "美食推荐")
    private List<String> foods;

    @Schema(description = "项目推荐")
    private List<String> projects;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "旅游记录")
    @JsonView(ReadView.class)
    private List<TravelRecordDto> recordList;
}
